<template>
  <view class="error-page">
    <EmptyBox :title="title" :img="imgUrl"></EmptyBox>
  </view>
</template>

<script setup>
import EmptyBox from '@/components/emptyBox'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
const title = ref('')
const imgUrl = ref('')
onLoad(option => {
  const _url = [
    'https://img.qumoyugo.com/webimgbg/pets-no-data-product-video.png',
    'https://img.qumoyugo.com/webimgbg/pets-no-data-user-empt.png'
  ]
  title.value = option.title || '404页面'
  imgUrl.value = _url[option.type || 0]
})
</script>

<style scoped lang="scss">
.error-page{
  // #ifdef H5
  height: calc(100vh - 44px);
  // #endif
  // #ifdef MP-WEIXIN
  height: 100vh;
  // #endif
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}
</style>
